<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

/**
 * 聊天记录
 */
class UserMsgLogTmp extends Model
{
    protected $table = 'user_msg_log_tmp';
    protected $fillable = [
        'msg_type', 'from_userid', 'to_userid', 'from_account', 'to_account', 'msg_detail', 'flag'
    ];

    public function fromProfile()
    {
        return $this->belongsTo(UserProfile::class, 'from_userid', 'user_id');
    }

    public function toProfile()
    {
        return $this->belongsTo(UserProfile::class, 'to_userid', 'user_id');
    }
}
